import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.List;

import org.junit.Before;
import org.junit.Test;

public class TestHuman {

	Human h;

	@Before
	public void setUp() throws Exception {
		h = new Human(1);
	}

	@Test
	public void getCardsTest() {
		for (int i = 2; i < 7; i++)
			h.ownedCards.add(new Card("diamond", i));
		assertEquals(h.ownedCards, h.getCards());
	}

	@Test
	public void takeCardsTest() {
		List<Card> cardList = new ArrayList<Card>();
		for (int i = 2; i < 7; i++)
			cardList.add(new Card("diamond", i));
		h.takeCards(cardList);
		assertEquals(h.ownedCards, cardList);
	}
	
	@Test
	public void getIDTest () {
		int id = h.getiD();
		assertEquals (id, 1);
	}
	
	@Test
	public void increaseOwnedMoneyTest () {
		h.increaseOwnedMoney(150);
		h.increaseOwnedMoney(60);
		assertEquals (210, h.getOwnedMoney());
	}
	
	@Test
	public void decreaseOwnedMoneyTest() {
		h.increaseOwnedMoney(200);
		h.decreaseOwnedMoney(50);
		assertEquals (150, h.getOwnedMoney());
	
	}
	
	@Test
	public void checkEnoughMoneyTest () {
		h.increaseOwnedMoney(50);
		assertEquals(false, h.checkEnoughMoney(100));
	}
	
	@Test
	public void checkEnoughMoneyTest2 () {
		h.increaseOwnedMoney(50);
		assertEquals (true, h.checkEnoughMoney(10));
	}
}